[IA64] bug fix in ioports_deny_access
authorawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Tue, 8 Aug 2006 20:38:10 +0000 (14:38 -0600)
committerawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Tue, 8 Aug 2006 20:38:10 +0000 (14:38 -0600)
Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
xen/arch/ia64/xen/mm.c

index a31a054c4f6237444f799babb2276baa296434b2..35e299c95101cda2ffce9494a4e7306ccd4b718b 100644 (file)
@@ -881,10 +881,10 @@ ioports_deny_access(struct domain *d, unsigned long fp, unsigned long lp)
         pte_t old_pte;
 
         port = IO_SPACE_SPARSE_DECODING (off);
-        if (port < fp || port + IO_SPACE_SPARSE_PORTS_PER_PAGE > lp) {
+        if (port < fp || port + IO_SPACE_SPARSE_PORTS_PER_PAGE - 1 > lp) {
             /* Maybe this covers an allowed port.  */
             if (ioports_has_allowed(d, port,
-                                    port + IO_SPACE_SPARSE_PORTS_PER_PAGE))
+                                    port + IO_SPACE_SPARSE_PORTS_PER_PAGE - 1))
                 continue;
         }